package org.bigjava.biz.impl;

import org.bigjava.bean.Xiaoqu;
import org.bigjava.biz.XiaoquService;
import org.bigjava.mapper.XiaoquMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("xiaoquService")
public class XiaoquServiceImpl implements XiaoquService {

    @Qualifier("xiaoquMapper")
    @Autowired
    XiaoquMapper xiaoquMapper;

    //根据小区名称或小区地址模糊查询
    @Override
    public List<Xiaoqu> xiaoQuMoHu(String name, String address) { return xiaoquMapper.xiaoQuMoHu(name,address); }
    //修改小区信息
    @Override
    public int xiaoQuXiuGai(Xiaoqu xiaoqu) { return xiaoquMapper.xiaoQuXiuGai(xiaoqu); }
    //根据id查小区
    @Override
    public Xiaoqu xiaoQuId(int id) { return xiaoquMapper.xiaoQuId(id); }
    //根据id假删除小区
    @Override
    public int xiaoQuShanChu(int id) { return xiaoquMapper.xiaoQuShanChu(id); }
    //小区总数
    @Override
    public int xiaoQuZong(){ return xiaoquMapper.xiaoQuZong(); }
    //小区分页查询
    @Override
    public List<Xiaoqu> xiaoQuFenYe(int offset , int length){ return xiaoquMapper.xiaoQuFenYe(offset,length); }
    @Override
    public int xiaoQuAdd(Xiaoqu xiaoqu) { return xiaoquMapper.xiaoQuAdd(xiaoqu); }

    //全部小区
    @Override
    public List<Xiaoqu> xiaoQuQuan(){
        return xiaoquMapper.xiaoQuQuan();
    }
}
